package com.vcc.service.boss.request.user;


import com.vcc.core.util.StringUtil;
import com.vcc.data.entity.BossUser;
import com.vcc.data.entity.User;
import com.vcc.service.boss.response.baseVo.BossBaseVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@Data
@Setter
@Getter
public class UserParamVoBoss extends BossBaseVo implements Serializable {

    private String email;

    private String account;

    public UserParamVoBoss(){}

    public UserParamVoBoss(User user){
        super.setId(user.getId());
        this.account = StringUtil.hideMobile(user.getAccount());
        this.email = user.getEmail();
    }

    public UserParamVoBoss(BossUser bossUser){
        super.setId(bossUser.getId());
        this.account = StringUtil.hideMobile(bossUser.getAccount());
        this.email = bossUser.getEmail();
    }
}
